package com.nengchuan.kbms.common;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * xml 西定义查询条件
 * @param <T>
 */
public class XmlListDTO<T> {

    private QueryWrapper<T> wrapper = null;

    public XmlListDTO() {}

    /**
     * for mapper.xml 自定义条件
     */
    @JsonIgnore
    public QueryWrapper<T> getEw() {
        if (wrapper == null) {
            synchronized (this) {
                if (wrapper == null) {
                    wrapper = new AutoWrapper<>(this);
                }
            }
        }
        return wrapper;
    }

}
